﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Drifter.Datasource;
using Drifter.Core;

namespace DrifterTest
{
    [TestClass]
    public class DataSourceTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
        }

        [TestMethod]
        public void TestMethod2()
        {
            List<FieldList> fieldListCollection = FieldListCollectionBuilder.GetFieldListCollection();

            IDataSource source = new MockDataSource() { FieldListCollection = fieldListCollection };
            var values = new List<string>();

            foreach (var fieldList in source)
            {
                values.Add(fieldList[0].Value.ToString());
                values.Add(fieldList[1].Value.ToString());
                values.Add(fieldList[2].Value.ToString());
            }

            Assert.AreEqual(9, values.Count);

        }

    }
}


